package au.com.mason.propertyTracker.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

@Entity
public class Search
{
	private Integer id;
	private String url;
	private SearchType searchType;
	
	private Search() {}
	
	public Search(String url) {
		this.url = url;
	}
	
	@Id
	@GeneratedValue
	@Column
	public Integer getId() {
		return id;
	}
	
	public void setId(final Integer id) {
		this.id = id;
	}

	@Column
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String name) {
		this.url = name;
	}

	@Enumerated(EnumType.STRING)
	public SearchType getSearchType() {
		return searchType;
	}

	public void setSearchType(SearchType searchType) {
		this.searchType = searchType;
	}

}
